<div class="categories">
   <p class="categories_title">
      DANH MỤC
   </p>
   <ul class="categories_parent">
   <?
   $product_categories = product_cat(0);
   foreach($product_categories as $key=>$cat){
      $product_categories_child = product_cat($cat['cat_id']);
   ?>
      <li class="categories_parent_li">
         <a href="<?=generate_service_cat_url($cat)?>"><?=$cat['cat_name']?><?=($product_categories_child  != NULL) ? '<span></span>' :''?></a>
            <?if($product_categories_child != NULL){?>
               <ul class="categories_child">
            <?
            foreach($product_categories_child as $key1=>$cat_child){
               $product_categories_child_child = product_cat($cat_child['cat_id']);
            ?>
            
               <li class="categories_child_li">
                  <a href="<?=generate_service_cat_url($cat_child)?>" class="<?=($product_categories_child_child  != NULL) ? 'has_child':''?>"><?=$cat_child['cat_name']?><?=($product_categories_child_child  != NULL) ? '<span></span>' :''?></a>
                  <?if($product_categories_child_child  != NULL){
                     ?>
                     <ul class="categories_child_child" style="display: none;">
                     <?
                     foreach($product_categories_child_child as $cat_child_child){
                  ?>
                     
                         <li class="categories_child_child_li">
                           <a href="<?=generate_service_cat_url($cat_child_child)?>"><?=$cat_child_child['cat_name']?></a>
                           
                         </li>
                         <? } ?>
                     </ul>
                  <? }?>
               </li>
               <? } ?>
            </ul>
         <? } ?>
      </li>
   <? } ?>
   </ul>
</div>
<?/*if(isset($ser_id))
   {
?>

<div class="post_connection">
   <p class="categories_title">
      BÀI LIÊN QUAN
   </p>
   <?
      $ser_connection = $templateServices->ser_connection($ser_id,$ser_info['ser_cat_id']);
      foreach($ser_connection as $key=>$row){
   ?>
         <div class="pc_one">
            <img src="<?=services_img.'small_'.$row['ser_picture']?>"/>
            <div class="pc_info">
               <a href=""><?=cut_string($row['ser_title'],40)?></a>
               <p class="pc_description"><?=cut_string($row['ser_summary'],40)?></p>
            </div>
         </div>
   <?
      }
   ?>
</div>
<?
   }*/
?>
<? include('vic_post_new.php')?>
